package com.example.springboot01.mapper;

import com.example.springboot01.model.Class;
import com.example.springboot01.model.Student;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @Auther: zrd
 * @Date: 2022/3/25/03/25/21:15
 * @Description: com.example.springboot01.mapper
 */
@Component
public interface ClassMapper {
    void insert(Class classes);
    List<Class> getIf(Class classes);
    List<Class> selectChoose(Class classes);
    List<Class> selectWhere(Class classes);
    List<Class> selectTrim(Class classes);
    void update(Class classes);
    List<Class> getAll();
    Class getOne(Long id);
    List<Class> selectForeachs(List<String> list);
    void delete(Long id);

    /**
     *使用嵌套查询方式做关系映射(一对多)
     * @param id：班级id
     * @return
     */
    Class selectByClassId(int id);
    /**
     * 使用嵌套结果方式做关系映射(一对多)
     * @param id
     * @return
     */
    Class selectByClassId2(int id);

}
